package o;

import android.content.Intent;
import androidx.annotation.NonNull;
import com.huawei.appgallery.downloadengine.api.SessionDownloadTask;

public class ejw implements cdt {
    public void ˊ(int i, @NonNull Object obj) {
        if (obj instanceof SessionDownloadTask) {
            ˋ((SessionDownloadTask) obj);
        }
    }

    private void ˋ(SessionDownloadTask sessionDownloadTask) {
        Intent intent = new Intent();
        intent.setAction(dvq.ˊ());
        int ˈ = sessionDownloadTask.ˈ();
        if (ˈ != 1) {
            intent.putExtra("downloadtask.status", ˈ);
        }
        intent.putExtra("UpgradePkgName", sessionDownloadTask.ˊˊ());
        intent.putExtra("UpgradeAppName", sessionDownloadTask.ʿ());
        switch (ˈ) {
            case 2:
                intent.setAction(dvq.ˏ());
                intent.putExtra("UpgradeDownloadProgress", sessionDownloadTask.ʼॱ());
                break;
            case 4:
                Logger.ˎ("HmsOrPayDownloadHandler", "task downloaded.go install.");
                dtb.ॱ().ˊ(sessionDownloadTask);
                ejr.ˏ().ˋ(sessionDownloadTask, new ejy());
                break;
            default:
                Logger.e("HmsOrPayDownloadHandler", "DownloadCode is: " + ˈ + " ,taskid:" + sessionDownloadTask.ʾ() + ",taskPkgName is: " + sessionDownloadTask.ˊˊ());
                break;
        }
        ContentManager.getInstant().getContext().sendBroadcast(intent);
    }
}
